<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/DOM练习3.css">
</head>
<body>
    <div class="box">
        <div class="pic" id="pic1">
            <img src="./img/t1.png" alt="" >
            <p>这是第一张</p>
        </div>
        <div class="pic" id="pic2">
            <img src="./img/t2.png" alt="" >
            <p>这是第二张</p>
        </div>
        <div class="pic" id="pic3">
            <img src="./img/t3.png" alt="" >
            <p>这是第三张</p>
        </div>
        <div class="pic" id="pic4">
            <img src="./img/t4.png" alt="" >
            <p>这是第四张</p>
        </div>
        <div class="left"><img src="./img/left.png" alt=""></div>
        <div class="right"><img src="./img/right.png" alt=""></div>
        <div class="page">
            <a href="#pic1" class="active"></a>
            <a href="#pic2"></a>
            <a href="#pic3"></a>
            <a href="#pic4"></a>
        </div>
    </div>
    <script>
        var left=document.querySelector('.left')
        var pics=document.querySelectorAll('.pic')
        var page=document.querySelectorAll('.page a')
        setInterval(function(){
            pics.forEach(function(pic){

            })
        },2000)
    </script>
</body>
</html>